package com.thti.mecool.client.command.result.plan;

import com.thti.mecool.client.base.BaseActivity;
import com.thti.mecool.client.base.HandlerConstant;
import com.thti.mecool.client.command.ICommand;
import com.thti.mecool.client.protocol.plan.UploadPlanProtocolResult;
import com.thti.mecool.client.service.Protocol;

public class UploadPlanCommand implements ICommand {

	@Override
	public void doCommand(Object o) {
		UploadPlanProtocolResult uploadPlanProtocolResult=(UploadPlanProtocolResult)o;
		if(uploadPlanProtocolResult.getStatus()==1){
			BaseActivity.setCurrentMesg(uploadPlanProtocolResult.getMsg());
			BaseActivity.setDataFlag(HandlerConstant.UploadCurCommand);
		}else{
			BaseActivity.setDataFlag(HandlerConstant.CommandFail);
		}
		
		
	}

	@Override
	public String getCommandID() {
		// TODO Auto-generated method stub
		return Protocol.getUploadPlan;
	}

	@Override
	public Class<?> getCommandClass() {
		// TODO Auto-generated method stub
		return UploadPlanProtocolResult.class;
	}

}
